 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

密钥管理服务
基于硬件保护密钥的安全数据托管服务

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKKms/KmsExecutor.h>

@implementation KmsClient

@synthesize userAgent = _userAgent;
@synthesize serviceName = _serviceName;
@synthesize version = _version;

-(void) addCustomerHeaderWithKey:(NSString*) key
                           value:(NSString*) value{
    if(![self customHeader])
    {
        self.customHeader = [[NSMutableDictionary alloc] init];
    }
    if(key && value)
    {
        [[self customHeader] setValue:value forKey:key];
    }
   
}

-(id)initWithGlobalConfig{
    if(![GlobalConfig credential])
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@"GlobalConfig credential not config" userInfo:nil];
        @throw e;
    }
    self.credential = [GlobalConfig credential];
    if(![GlobalConfig sdkEnvironment])
    {
        self.sdkEnvironment = [[SDKEnvironment alloc] initWithEndPoint:@"kms.jdcloud-api.com"];
    }else
    {
        self.sdkEnvironment = [GlobalConfig sdkEnvironment];
    }
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 kms  v1";
    _serviceName = @"kms";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}

-(id)initWithCredential:(Credential*)credential
         sdkEnvironment:(SDKEnvironment*)sdkEnvironment
{
    if(!credential)
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@" credential can not null" userInfo:nil];
        @throw e;
    }else{
        self.credential = credential;
    }
    
    if(!sdkEnvironment)
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@" sdkEnvironment can not null" userInfo:nil];
        @throw e;
    }else{
        self.sdkEnvironment = sdkEnvironment;
    }
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 kms  v1";
    _serviceName = @"kms";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}

-(id)initWithCredential:(Credential*)credential
{
    if(!credential)
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@" credential can not null" userInfo:nil];
        @throw e;
    }else{
        self.credential = credential;
    }
    if(![GlobalConfig sdkEnvironment])
    {
        self.sdkEnvironment = [[SDKEnvironment alloc] initWithEndPoint:@"kms.jdcloud-api.com"];
    }else
    {
        self.sdkEnvironment = [GlobalConfig sdkEnvironment];
    }
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 kms  v1";
    _serviceName = @"kms";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}

-(id)init{
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 kms  v1";
    _serviceName = @"kms";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}


/**
getPublicKey sync request
@param getPublicKeyRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getPublicKeyResponse` the request response data model
*/
-(NSDictionary*) getPublicKeySyncWithRequest:(KmsGetPublicKeyRequest*) getPublicKeyRequest
{
KmsGetPublicKeyExecutor* excutor = [[KmsGetPublicKeyExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:getPublicKeyRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsGetPublicKeyResponse* response = [[KmsGetPublicKeyResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"getPublicKeyResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)getPublicKeyAsyncWithRequest:(KmsGetPublicKeyRequest*) getPublicKeyRequest
                       completionHandler:(void(^)(int statusCode,KmsGetPublicKeyResponse* _Nullable getPublicKeyResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsGetPublicKeyExecutor* excutor = [[KmsGetPublicKeyExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:getPublicKeyRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsGetPublicKeyResponse* response = [[KmsGetPublicKeyResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeKeyList sync request
@param describeKeyListRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeKeyListResponse` the request response data model
*/
-(NSDictionary*) describeKeyListSyncWithRequest:(KmsDescribeKeyListRequest*) describeKeyListRequest
{
KmsDescribeKeyListExecutor* excutor = [[KmsDescribeKeyListExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeKeyListRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDescribeKeyListResponse* response = [[KmsDescribeKeyListResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeKeyListResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeKeyListAsyncWithRequest:(KmsDescribeKeyListRequest*) describeKeyListRequest
                       completionHandler:(void(^)(int statusCode,KmsDescribeKeyListResponse* _Nullable describeKeyListResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDescribeKeyListExecutor* excutor = [[KmsDescribeKeyListExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeKeyListRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDescribeKeyListResponse* response = [[KmsDescribeKeyListResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
updateSecretVersion sync request
@param updateSecretVersionRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `updateSecretVersionResponse` the request response data model
*/
-(NSDictionary*) updateSecretVersionSyncWithRequest:(KmsUpdateSecretVersionRequest*) updateSecretVersionRequest
{
KmsUpdateSecretVersionExecutor* excutor = [[KmsUpdateSecretVersionExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:updateSecretVersionRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsUpdateSecretVersionResponse* response = [[KmsUpdateSecretVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"updateSecretVersionResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)updateSecretVersionAsyncWithRequest:(KmsUpdateSecretVersionRequest*) updateSecretVersionRequest
                       completionHandler:(void(^)(int statusCode,KmsUpdateSecretVersionResponse* _Nullable updateSecretVersionResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsUpdateSecretVersionExecutor* excutor = [[KmsUpdateSecretVersionExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:updateSecretVersionRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsUpdateSecretVersionResponse* response = [[KmsUpdateSecretVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
generateDataKey sync request
@param generateDataKeyRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `generateDataKeyResponse` the request response data model
*/
-(NSDictionary*) generateDataKeySyncWithRequest:(KmsGenerateDataKeyRequest*) generateDataKeyRequest
{
KmsGenerateDataKeyExecutor* excutor = [[KmsGenerateDataKeyExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:generateDataKeyRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsGenerateDataKeyResponse* response = [[KmsGenerateDataKeyResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"generateDataKeyResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)generateDataKeyAsyncWithRequest:(KmsGenerateDataKeyRequest*) generateDataKeyRequest
                       completionHandler:(void(^)(int statusCode,KmsGenerateDataKeyResponse* _Nullable generateDataKeyResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsGenerateDataKeyExecutor* excutor = [[KmsGenerateDataKeyExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:generateDataKeyRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsGenerateDataKeyResponse* response = [[KmsGenerateDataKeyResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
createSecret sync request
@param createSecretRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createSecretResponse` the request response data model
*/
-(NSDictionary*) createSecretSyncWithRequest:(KmsCreateSecretRequest*) createSecretRequest
{
KmsCreateSecretExecutor* excutor = [[KmsCreateSecretExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:createSecretRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsCreateSecretResponse* response = [[KmsCreateSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"createSecretResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)createSecretAsyncWithRequest:(KmsCreateSecretRequest*) createSecretRequest
                       completionHandler:(void(^)(int statusCode,KmsCreateSecretResponse* _Nullable createSecretResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsCreateSecretExecutor* excutor = [[KmsCreateSecretExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:createSecretRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsCreateSecretResponse* response = [[KmsCreateSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
enableKeyVersion sync request
@param enableKeyVersionRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `enableKeyVersionResponse` the request response data model
*/
-(NSDictionary*) enableKeyVersionSyncWithRequest:(KmsEnableKeyVersionRequest*) enableKeyVersionRequest
{
KmsEnableKeyVersionExecutor* excutor = [[KmsEnableKeyVersionExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:enableKeyVersionRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsEnableKeyVersionResponse* response = [[KmsEnableKeyVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"enableKeyVersionResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)enableKeyVersionAsyncWithRequest:(KmsEnableKeyVersionRequest*) enableKeyVersionRequest
                       completionHandler:(void(^)(int statusCode,KmsEnableKeyVersionResponse* _Nullable enableKeyVersionResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsEnableKeyVersionExecutor* excutor = [[KmsEnableKeyVersionExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:enableKeyVersionRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsEnableKeyVersionResponse* response = [[KmsEnableKeyVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
encrypt sync request
@param encryptRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `encryptResponse` the request response data model
*/
-(NSDictionary*) encryptSyncWithRequest:(KmsEncryptRequest*) encryptRequest
{
KmsEncryptExecutor* excutor = [[KmsEncryptExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:encryptRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsEncryptResponse* response = [[KmsEncryptResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"encryptResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)encryptAsyncWithRequest:(KmsEncryptRequest*) encryptRequest
                       completionHandler:(void(^)(int statusCode,KmsEncryptResponse* _Nullable encryptResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsEncryptExecutor* excutor = [[KmsEncryptExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:encryptRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsEncryptResponse* response = [[KmsEncryptResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
enableKey sync request
@param enableKeyRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `enableKeyResponse` the request response data model
*/
-(NSDictionary*) enableKeySyncWithRequest:(KmsEnableKeyRequest*) enableKeyRequest
{
KmsEnableKeyExecutor* excutor = [[KmsEnableKeyExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:enableKeyRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsEnableKeyResponse* response = [[KmsEnableKeyResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"enableKeyResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)enableKeyAsyncWithRequest:(KmsEnableKeyRequest*) enableKeyRequest
                       completionHandler:(void(^)(int statusCode,KmsEnableKeyResponse* _Nullable enableKeyResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsEnableKeyExecutor* excutor = [[KmsEnableKeyExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:enableKeyRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsEnableKeyResponse* response = [[KmsEnableKeyResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
cancelKeyDeletion sync request
@param cancelKeyDeletionRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `cancelKeyDeletionResponse` the request response data model
*/
-(NSDictionary*) cancelKeyDeletionSyncWithRequest:(KmsCancelKeyDeletionRequest*) cancelKeyDeletionRequest
{
KmsCancelKeyDeletionExecutor* excutor = [[KmsCancelKeyDeletionExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:cancelKeyDeletionRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsCancelKeyDeletionResponse* response = [[KmsCancelKeyDeletionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"cancelKeyDeletionResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)cancelKeyDeletionAsyncWithRequest:(KmsCancelKeyDeletionRequest*) cancelKeyDeletionRequest
                       completionHandler:(void(^)(int statusCode,KmsCancelKeyDeletionResponse* _Nullable cancelKeyDeletionResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsCancelKeyDeletionExecutor* excutor = [[KmsCancelKeyDeletionExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:cancelKeyDeletionRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsCancelKeyDeletionResponse* response = [[KmsCancelKeyDeletionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
deleteSecret sync request
@param deleteSecretRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `deleteSecretResponse` the request response data model
*/
-(NSDictionary*) deleteSecretSyncWithRequest:(KmsDeleteSecretRequest*) deleteSecretRequest
{
KmsDeleteSecretExecutor* excutor = [[KmsDeleteSecretExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:deleteSecretRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDeleteSecretResponse* response = [[KmsDeleteSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"deleteSecretResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)deleteSecretAsyncWithRequest:(KmsDeleteSecretRequest*) deleteSecretRequest
                       completionHandler:(void(^)(int statusCode,KmsDeleteSecretResponse* _Nullable deleteSecretResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDeleteSecretExecutor* excutor = [[KmsDeleteSecretExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:deleteSecretRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDeleteSecretResponse* response = [[KmsDeleteSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
disableSecret sync request
@param disableSecretRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `disableSecretResponse` the request response data model
*/
-(NSDictionary*) disableSecretSyncWithRequest:(KmsDisableSecretRequest*) disableSecretRequest
{
KmsDisableSecretExecutor* excutor = [[KmsDisableSecretExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:disableSecretRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDisableSecretResponse* response = [[KmsDisableSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"disableSecretResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)disableSecretAsyncWithRequest:(KmsDisableSecretRequest*) disableSecretRequest
                       completionHandler:(void(^)(int statusCode,KmsDisableSecretResponse* _Nullable disableSecretResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDisableSecretExecutor* excutor = [[KmsDisableSecretExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:disableSecretRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDisableSecretResponse* response = [[KmsDisableSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
disableSecretVersion sync request
@param disableSecretVersionRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `disableSecretVersionResponse` the request response data model
*/
-(NSDictionary*) disableSecretVersionSyncWithRequest:(KmsDisableSecretVersionRequest*) disableSecretVersionRequest
{
KmsDisableSecretVersionExecutor* excutor = [[KmsDisableSecretVersionExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:disableSecretVersionRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDisableSecretVersionResponse* response = [[KmsDisableSecretVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"disableSecretVersionResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)disableSecretVersionAsyncWithRequest:(KmsDisableSecretVersionRequest*) disableSecretVersionRequest
                       completionHandler:(void(^)(int statusCode,KmsDisableSecretVersionResponse* _Nullable disableSecretVersionResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDisableSecretVersionExecutor* excutor = [[KmsDisableSecretVersionExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:disableSecretVersionRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDisableSecretVersionResponse* response = [[KmsDisableSecretVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
createKey sync request
@param createKeyRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createKeyResponse` the request response data model
*/
-(NSDictionary*) createKeySyncWithRequest:(KmsCreateKeyRequest*) createKeyRequest
{
KmsCreateKeyExecutor* excutor = [[KmsCreateKeyExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:createKeyRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsCreateKeyResponse* response = [[KmsCreateKeyResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"createKeyResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)createKeyAsyncWithRequest:(KmsCreateKeyRequest*) createKeyRequest
                       completionHandler:(void(^)(int statusCode,KmsCreateKeyResponse* _Nullable createKeyResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsCreateKeyExecutor* excutor = [[KmsCreateKeyExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:createKeyRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsCreateKeyResponse* response = [[KmsCreateKeyResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
updateKeyDescription sync request
@param updateKeyDescriptionRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `updateKeyDescriptionResponse` the request response data model
*/
-(NSDictionary*) updateKeyDescriptionSyncWithRequest:(KmsUpdateKeyDescriptionRequest*) updateKeyDescriptionRequest
{
KmsUpdateKeyDescriptionExecutor* excutor = [[KmsUpdateKeyDescriptionExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:updateKeyDescriptionRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsUpdateKeyDescriptionResponse* response = [[KmsUpdateKeyDescriptionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"updateKeyDescriptionResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)updateKeyDescriptionAsyncWithRequest:(KmsUpdateKeyDescriptionRequest*) updateKeyDescriptionRequest
                       completionHandler:(void(^)(int statusCode,KmsUpdateKeyDescriptionResponse* _Nullable updateKeyDescriptionResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsUpdateKeyDescriptionExecutor* excutor = [[KmsUpdateKeyDescriptionExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:updateKeyDescriptionRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsUpdateKeyDescriptionResponse* response = [[KmsUpdateKeyDescriptionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
sign sync request
@param signRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `signResponse` the request response data model
*/
-(NSDictionary*) signSyncWithRequest:(KmsSignRequest*) signRequest
{
KmsSignExecutor* excutor = [[KmsSignExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:signRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsSignResponse* response = [[KmsSignResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"signResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)signAsyncWithRequest:(KmsSignRequest*) signRequest
                       completionHandler:(void(^)(int statusCode,KmsSignResponse* _Nullable signResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsSignExecutor* excutor = [[KmsSignExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:signRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsSignResponse* response = [[KmsSignResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeSecretVersionList sync request
@param describeSecretVersionListRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeSecretVersionListResponse` the request response data model
*/
-(NSDictionary*) describeSecretVersionListSyncWithRequest:(KmsDescribeSecretVersionListRequest*) describeSecretVersionListRequest
{
KmsDescribeSecretVersionListExecutor* excutor = [[KmsDescribeSecretVersionListExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeSecretVersionListRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDescribeSecretVersionListResponse* response = [[KmsDescribeSecretVersionListResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeSecretVersionListResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeSecretVersionListAsyncWithRequest:(KmsDescribeSecretVersionListRequest*) describeSecretVersionListRequest
                       completionHandler:(void(^)(int statusCode,KmsDescribeSecretVersionListResponse* _Nullable describeSecretVersionListResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDescribeSecretVersionListExecutor* excutor = [[KmsDescribeSecretVersionListExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeSecretVersionListRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDescribeSecretVersionListResponse* response = [[KmsDescribeSecretVersionListResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
exportSecret sync request
@param exportSecretRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `exportSecretResponse` the request response data model
*/
-(NSDictionary*) exportSecretSyncWithRequest:(KmsExportSecretRequest*) exportSecretRequest
{
KmsExportSecretExecutor* excutor = [[KmsExportSecretExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:exportSecretRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsExportSecretResponse* response = [[KmsExportSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"exportSecretResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)exportSecretAsyncWithRequest:(KmsExportSecretRequest*) exportSecretRequest
                       completionHandler:(void(^)(int statusCode,KmsExportSecretResponse* _Nullable exportSecretResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsExportSecretExecutor* excutor = [[KmsExportSecretExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:exportSecretRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsExportSecretResponse* response = [[KmsExportSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
validate sync request
@param validateRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `validateResponse` the request response data model
*/
-(NSDictionary*) validateSyncWithRequest:(KmsValidateRequest*) validateRequest
{
KmsValidateExecutor* excutor = [[KmsValidateExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:validateRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsValidateResponse* response = [[KmsValidateResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"validateResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)validateAsyncWithRequest:(KmsValidateRequest*) validateRequest
                       completionHandler:(void(^)(int statusCode,KmsValidateResponse* _Nullable validateResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsValidateExecutor* excutor = [[KmsValidateExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:validateRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsValidateResponse* response = [[KmsValidateResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
deleteSecretVersion sync request
@param deleteSecretVersionRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `deleteSecretVersionResponse` the request response data model
*/
-(NSDictionary*) deleteSecretVersionSyncWithRequest:(KmsDeleteSecretVersionRequest*) deleteSecretVersionRequest
{
KmsDeleteSecretVersionExecutor* excutor = [[KmsDeleteSecretVersionExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:deleteSecretVersionRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDeleteSecretVersionResponse* response = [[KmsDeleteSecretVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"deleteSecretVersionResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)deleteSecretVersionAsyncWithRequest:(KmsDeleteSecretVersionRequest*) deleteSecretVersionRequest
                       completionHandler:(void(^)(int statusCode,KmsDeleteSecretVersionResponse* _Nullable deleteSecretVersionResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDeleteSecretVersionExecutor* excutor = [[KmsDeleteSecretVersionExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:deleteSecretVersionRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDeleteSecretVersionResponse* response = [[KmsDeleteSecretVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeKey sync request
@param describeKeyRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeKeyResponse` the request response data model
*/
-(NSDictionary*) describeKeySyncWithRequest:(KmsDescribeKeyRequest*) describeKeyRequest
{
KmsDescribeKeyExecutor* excutor = [[KmsDescribeKeyExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeKeyRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDescribeKeyResponse* response = [[KmsDescribeKeyResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeKeyResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeKeyAsyncWithRequest:(KmsDescribeKeyRequest*) describeKeyRequest
                       completionHandler:(void(^)(int statusCode,KmsDescribeKeyResponse* _Nullable describeKeyResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDescribeKeyExecutor* excutor = [[KmsDescribeKeyExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeKeyRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDescribeKeyResponse* response = [[KmsDescribeKeyResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
importSecret sync request
@param importSecretRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `importSecretResponse` the request response data model
*/
-(NSDictionary*) importSecretSyncWithRequest:(KmsImportSecretRequest*) importSecretRequest
{
KmsImportSecretExecutor* excutor = [[KmsImportSecretExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:importSecretRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsImportSecretResponse* response = [[KmsImportSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"importSecretResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)importSecretAsyncWithRequest:(KmsImportSecretRequest*) importSecretRequest
                       completionHandler:(void(^)(int statusCode,KmsImportSecretResponse* _Nullable importSecretResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsImportSecretExecutor* excutor = [[KmsImportSecretExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:importSecretRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsImportSecretResponse* response = [[KmsImportSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
scheduleKeyDeletion sync request
@param scheduleKeyDeletionRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `scheduleKeyDeletionResponse` the request response data model
*/
-(NSDictionary*) scheduleKeyDeletionSyncWithRequest:(KmsScheduleKeyDeletionRequest*) scheduleKeyDeletionRequest
{
KmsScheduleKeyDeletionExecutor* excutor = [[KmsScheduleKeyDeletionExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:scheduleKeyDeletionRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsScheduleKeyDeletionResponse* response = [[KmsScheduleKeyDeletionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"scheduleKeyDeletionResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)scheduleKeyDeletionAsyncWithRequest:(KmsScheduleKeyDeletionRequest*) scheduleKeyDeletionRequest
                       completionHandler:(void(^)(int statusCode,KmsScheduleKeyDeletionResponse* _Nullable scheduleKeyDeletionResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsScheduleKeyDeletionExecutor* excutor = [[KmsScheduleKeyDeletionExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:scheduleKeyDeletionRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsScheduleKeyDeletionResponse* response = [[KmsScheduleKeyDeletionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
keyRotation sync request
@param keyRotationRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `keyRotationResponse` the request response data model
*/
-(NSDictionary*) keyRotationSyncWithRequest:(KmsKeyRotationRequest*) keyRotationRequest
{
KmsKeyRotationExecutor* excutor = [[KmsKeyRotationExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:keyRotationRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsKeyRotationResponse* response = [[KmsKeyRotationResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"keyRotationResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)keyRotationAsyncWithRequest:(KmsKeyRotationRequest*) keyRotationRequest
                       completionHandler:(void(^)(int statusCode,KmsKeyRotationResponse* _Nullable keyRotationResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsKeyRotationExecutor* excutor = [[KmsKeyRotationExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:keyRotationRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsKeyRotationResponse* response = [[KmsKeyRotationResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeSecretList sync request
@param describeSecretListRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeSecretListResponse` the request response data model
*/
-(NSDictionary*) describeSecretListSyncWithRequest:(KmsDescribeSecretListRequest*) describeSecretListRequest
{
KmsDescribeSecretListExecutor* excutor = [[KmsDescribeSecretListExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeSecretListRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDescribeSecretListResponse* response = [[KmsDescribeSecretListResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeSecretListResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeSecretListAsyncWithRequest:(KmsDescribeSecretListRequest*) describeSecretListRequest
                       completionHandler:(void(^)(int statusCode,KmsDescribeSecretListResponse* _Nullable describeSecretListResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDescribeSecretListExecutor* excutor = [[KmsDescribeSecretListExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeSecretListRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDescribeSecretListResponse* response = [[KmsDescribeSecretListResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeSecretVersionInfo sync request
@param describeSecretVersionInfoRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeSecretVersionInfoResponse` the request response data model
*/
-(NSDictionary*) describeSecretVersionInfoSyncWithRequest:(KmsDescribeSecretVersionInfoRequest*) describeSecretVersionInfoRequest
{
KmsDescribeSecretVersionInfoExecutor* excutor = [[KmsDescribeSecretVersionInfoExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeSecretVersionInfoRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDescribeSecretVersionInfoResponse* response = [[KmsDescribeSecretVersionInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeSecretVersionInfoResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeSecretVersionInfoAsyncWithRequest:(KmsDescribeSecretVersionInfoRequest*) describeSecretVersionInfoRequest
                       completionHandler:(void(^)(int statusCode,KmsDescribeSecretVersionInfoResponse* _Nullable describeSecretVersionInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDescribeSecretVersionInfoExecutor* excutor = [[KmsDescribeSecretVersionInfoExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeSecretVersionInfoRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDescribeSecretVersionInfoResponse* response = [[KmsDescribeSecretVersionInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
disableKeyVersion sync request
@param disableKeyVersionRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `disableKeyVersionResponse` the request response data model
*/
-(NSDictionary*) disableKeyVersionSyncWithRequest:(KmsDisableKeyVersionRequest*) disableKeyVersionRequest
{
KmsDisableKeyVersionExecutor* excutor = [[KmsDisableKeyVersionExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:disableKeyVersionRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDisableKeyVersionResponse* response = [[KmsDisableKeyVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"disableKeyVersionResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)disableKeyVersionAsyncWithRequest:(KmsDisableKeyVersionRequest*) disableKeyVersionRequest
                       completionHandler:(void(^)(int statusCode,KmsDisableKeyVersionResponse* _Nullable disableKeyVersionResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDisableKeyVersionExecutor* excutor = [[KmsDisableKeyVersionExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:disableKeyVersionRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDisableKeyVersionResponse* response = [[KmsDisableKeyVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
decrypt sync request
@param decryptRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `decryptResponse` the request response data model
*/
-(NSDictionary*) decryptSyncWithRequest:(KmsDecryptRequest*) decryptRequest
{
KmsDecryptExecutor* excutor = [[KmsDecryptExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:decryptRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDecryptResponse* response = [[KmsDecryptResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"decryptResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)decryptAsyncWithRequest:(KmsDecryptRequest*) decryptRequest
                       completionHandler:(void(^)(int statusCode,KmsDecryptResponse* _Nullable decryptResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDecryptExecutor* excutor = [[KmsDecryptExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:decryptRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDecryptResponse* response = [[KmsDecryptResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
enableSecret sync request
@param enableSecretRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `enableSecretResponse` the request response data model
*/
-(NSDictionary*) enableSecretSyncWithRequest:(KmsEnableSecretRequest*) enableSecretRequest
{
KmsEnableSecretExecutor* excutor = [[KmsEnableSecretExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:enableSecretRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsEnableSecretResponse* response = [[KmsEnableSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"enableSecretResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)enableSecretAsyncWithRequest:(KmsEnableSecretRequest*) enableSecretRequest
                       completionHandler:(void(^)(int statusCode,KmsEnableSecretResponse* _Nullable enableSecretResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsEnableSecretExecutor* excutor = [[KmsEnableSecretExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:enableSecretRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsEnableSecretResponse* response = [[KmsEnableSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
disableKey sync request
@param disableKeyRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `disableKeyResponse` the request response data model
*/
-(NSDictionary*) disableKeySyncWithRequest:(KmsDisableKeyRequest*) disableKeyRequest
{
KmsDisableKeyExecutor* excutor = [[KmsDisableKeyExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:disableKeyRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDisableKeyResponse* response = [[KmsDisableKeyResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"disableKeyResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)disableKeyAsyncWithRequest:(KmsDisableKeyRequest*) disableKeyRequest
                       completionHandler:(void(^)(int statusCode,KmsDisableKeyResponse* _Nullable disableKeyResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDisableKeyExecutor* excutor = [[KmsDisableKeyExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:disableKeyRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDisableKeyResponse* response = [[KmsDisableKeyResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
enableSecretVersion sync request
@param enableSecretVersionRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `enableSecretVersionResponse` the request response data model
*/
-(NSDictionary*) enableSecretVersionSyncWithRequest:(KmsEnableSecretVersionRequest*) enableSecretVersionRequest
{
KmsEnableSecretVersionExecutor* excutor = [[KmsEnableSecretVersionExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:enableSecretVersionRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsEnableSecretVersionResponse* response = [[KmsEnableSecretVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"enableSecretVersionResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)enableSecretVersionAsyncWithRequest:(KmsEnableSecretVersionRequest*) enableSecretVersionRequest
                       completionHandler:(void(^)(int statusCode,KmsEnableSecretVersionResponse* _Nullable enableSecretVersionResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsEnableSecretVersionExecutor* excutor = [[KmsEnableSecretVersionExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:enableSecretVersionRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsEnableSecretVersionResponse* response = [[KmsEnableSecretVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
scheduleKeyVersionDeletion sync request
@param scheduleKeyVersionDeletionRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `scheduleKeyVersionDeletionResponse` the request response data model
*/
-(NSDictionary*) scheduleKeyVersionDeletionSyncWithRequest:(KmsScheduleKeyVersionDeletionRequest*) scheduleKeyVersionDeletionRequest
{
KmsScheduleKeyVersionDeletionExecutor* excutor = [[KmsScheduleKeyVersionDeletionExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:scheduleKeyVersionDeletionRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsScheduleKeyVersionDeletionResponse* response = [[KmsScheduleKeyVersionDeletionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"scheduleKeyVersionDeletionResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)scheduleKeyVersionDeletionAsyncWithRequest:(KmsScheduleKeyVersionDeletionRequest*) scheduleKeyVersionDeletionRequest
                       completionHandler:(void(^)(int statusCode,KmsScheduleKeyVersionDeletionResponse* _Nullable scheduleKeyVersionDeletionResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsScheduleKeyVersionDeletionExecutor* excutor = [[KmsScheduleKeyVersionDeletionExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:scheduleKeyVersionDeletionRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsScheduleKeyVersionDeletionResponse* response = [[KmsScheduleKeyVersionDeletionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
createSecretVersion sync request
@param createSecretVersionRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createSecretVersionResponse` the request response data model
*/
-(NSDictionary*) createSecretVersionSyncWithRequest:(KmsCreateSecretVersionRequest*) createSecretVersionRequest
{
KmsCreateSecretVersionExecutor* excutor = [[KmsCreateSecretVersionExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:createSecretVersionRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsCreateSecretVersionResponse* response = [[KmsCreateSecretVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"createSecretVersionResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)createSecretVersionAsyncWithRequest:(KmsCreateSecretVersionRequest*) createSecretVersionRequest
                       completionHandler:(void(^)(int statusCode,KmsCreateSecretVersionResponse* _Nullable createSecretVersionResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsCreateSecretVersionExecutor* excutor = [[KmsCreateSecretVersionExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:createSecretVersionRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsCreateSecretVersionResponse* response = [[KmsCreateSecretVersionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeKeyDetail sync request
@param describeKeyDetailRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeKeyDetailResponse` the request response data model
*/
-(NSDictionary*) describeKeyDetailSyncWithRequest:(KmsDescribeKeyDetailRequest*) describeKeyDetailRequest
{
KmsDescribeKeyDetailExecutor* excutor = [[KmsDescribeKeyDetailExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeKeyDetailRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDescribeKeyDetailResponse* response = [[KmsDescribeKeyDetailResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeKeyDetailResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeKeyDetailAsyncWithRequest:(KmsDescribeKeyDetailRequest*) describeKeyDetailRequest
                       completionHandler:(void(^)(int statusCode,KmsDescribeKeyDetailResponse* _Nullable describeKeyDetailResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsDescribeKeyDetailExecutor* excutor = [[KmsDescribeKeyDetailExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeKeyDetailRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsDescribeKeyDetailResponse* response = [[KmsDescribeKeyDetailResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
updateSecret sync request
@param updateSecretRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `updateSecretResponse` the request response data model
*/
-(NSDictionary*) updateSecretSyncWithRequest:(KmsUpdateSecretRequest*) updateSecretRequest
{
KmsUpdateSecretExecutor* excutor = [[KmsUpdateSecretExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:updateSecretRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsUpdateSecretResponse* response = [[KmsUpdateSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"updateSecretResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)updateSecretAsyncWithRequest:(KmsUpdateSecretRequest*) updateSecretRequest
                       completionHandler:(void(^)(int statusCode,KmsUpdateSecretResponse* _Nullable updateSecretResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsUpdateSecretExecutor* excutor = [[KmsUpdateSecretExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:updateSecretRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsUpdateSecretResponse* response = [[KmsUpdateSecretResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
cancelKeyVersionDeletion sync request
@param cancelKeyVersionDeletionRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `cancelKeyVersionDeletionResponse` the request response data model
*/
-(NSDictionary*) cancelKeyVersionDeletionSyncWithRequest:(KmsCancelKeyVersionDeletionRequest*) cancelKeyVersionDeletionRequest
{
KmsCancelKeyVersionDeletionExecutor* excutor = [[KmsCancelKeyVersionDeletionExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:cancelKeyVersionDeletionRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsCancelKeyVersionDeletionResponse* response = [[KmsCancelKeyVersionDeletionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"cancelKeyVersionDeletionResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)cancelKeyVersionDeletionAsyncWithRequest:(KmsCancelKeyVersionDeletionRequest*) cancelKeyVersionDeletionRequest
                       completionHandler:(void(^)(int statusCode,KmsCancelKeyVersionDeletionResponse* _Nullable cancelKeyVersionDeletionResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
KmsCancelKeyVersionDeletionExecutor* excutor = [[KmsCancelKeyVersionDeletionExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:cancelKeyVersionDeletionRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    KmsCancelKeyVersionDeletionResponse* response = [[KmsCancelKeyVersionDeletionResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}


 /**
 kms common sync request
 @param  jdcloudDataRequest request param
 @return key `statusCode` http request status code type is int
             `dataResult` the http request response data  type is NSData
             `requestError` the request error type is NSError
 */
 -(NSDictionary*) kmsCommonSyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                                   url:(NSString*) url
                                                method:(NSString*) method{
    CommonExecutor* excutor = [[CommonExecutor alloc] initWithJDCloudClient:self url:url method:method];
    NSDictionary* responseResult = [excutor executeDataSync:jdcloudDataRequest];
    return responseResult;
}

-(void)kmsCommonAsyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                         url:(NSString*) url
                                      method:(NSString*) method
                           completionHandler:(void(^)(int statusCode, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
     CommonExecutor* excutor = [[CommonExecutor alloc] initWithJDCloudClient:self url:url method:method];
    
    [excutor executeDataAsync:jdcloudDataRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        completionHandler(statusCode,responseData,error);
    }];
} 

@end
